<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page errorPage="../errorPage.jsp" %>
<c:if test="${empty sessionScope.user}">
	<c:redirect url="../login.jsp" />
</c:if>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="ISO-8859-1">
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/template.css">
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/header.css">
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/footer.css">
		<title>Dettagli account</title>
	</head>
	
	<body>
		<div id="body">
			<%@ include file="../header.jsp" %>
			
			<%@ include file="../menu.jsp" %>
			
			<div id="title">
				Dettagli del tuo account
			</div>
			
			<div id="content">
				<div>
					Nickname: <span class="bold"><c:out value="${sessionScope.user.nickname}" /></span>
				</div>
				
				<c:if test="${sessionScope.user.getClass().name == 'accountManagement.Client'}">
					<div>
						Cognome: <span class="bold"><c:out value="${sessionScope.user.surname}" /></span>
					</div>
					<div>
						Nome: <span class="bold"><c:out value="${sessionScope.user.name}" /></span>
					</div>
					<div>
						Codice fiscale: <span class="bold"><c:out value="${sessionScope.user.fiscalCode}" /></span>
					</div>
				</c:if>
				
				<c:if test="${sessionScope.user.getClass().name ==  'accountManagement.Employee'}">
					<div>
						Codice operatore: <span class="bold"><c:out value="${sessionScope.user.employeeId}" /></span>
					</div>
				</c:if>
			</div>
		
			<%@ include file="../footer.jsp" %>
		</div>
	</body>
</html>